package com.z.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.z.blog.entity.Comment;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;
import java.util.List;

/**
 * 评论实体Mapper接口
 *
 * @author jmys
 * @date 2022-09-01
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    /**
     * 查询评论实体列表
     *
     * @param comment 评论实体
     * @return 评论实体集合
     */
    List<Comment> selectCommentList(Comment comment);

    /**
     * 查询评论实体列表
     *
     * @param pid 上级评论id
     * @return 评论实体集合
     */
    List<Comment> selectCommentByPid(Integer pid);

    void deleteCommentByBlogIds(Collection<?> list);
}
